package com.wheat;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

/**
 * 项目启动入口 --> 引入cloud config
 *
 * @author wheat on 2019/12/2.
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@MapperScan("com.wheat")
@EnableEurekaClient
public class WheatAdminApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(WheatAdminApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(WheatAdminApplication.class, args);
        System.out.println("男孩后台系统启动成功");
    }
}
